//
//  LolModel.m
//  11202
//
//  Created by student on 16/3/3.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "LolModel.h"

@implementation LolModel

- (instancetype)initWithDictionary:(NSDictionary *)d
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:d];
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary *)d
{
    return [[self alloc]initWithDictionary:d];
}
+ (NSArray *)lolModel
{
    NSString *path = [[NSBundle mainBundle]pathForResource:@"heroes" ofType:@"plist"];
    NSArray *arr = [NSArray arrayWithContentsOfFile:path];
    NSMutableArray *tmp = [NSMutableArray array];
    for (NSDictionary *dict in arr) {
        LolModel *lm = [LolModel initWithDictionary:dict];
        [tmp addObject:lm];
    }
    return tmp;
}
@end
